// Selection Shader

#version 130

in vec4 vertex;
in uint vid;
flat out vec4 fid;

uniform mat4 vpMatrix;

void main(void)
{
  fid = vec4(float(vid>>24u)/255.0f, float((vid<<8u)>>24u)/255.0f,
             float((vid<<16u)>>24u)/255.0f, float((vid<<24u)>>24u)/255.0f);
  gl_Position = vpMatrix * vertex;
}
